﻿using Abp.Application.Services.Dto;
using Mt.Site.Application.ContentManagement.FrontEnd.Dto;
using Mt.Site.Application.Dto.Add;
using Mt.Site.Core.Storage;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Mt.Site.Application.ContentManagement.FrontEnd
{
    public interface IContentFrontEndAppService : IFrontEndAppService
    {
        Task<_ContentDto> _GetContentAsync(_ContentInput input, Func<_ContentDto, bool> func);

        #region 基础接口
        /// <summary>
        /// 获取内容详情页
        /// </summary>
        /// <param name="input">内容的输入模型</param>
        /// <returns>如果未找到返回空；搜索文件数据的字典如果没数据则为默认值</returns>
        Task<_ContentDto> _GetContentAsync(_ContentInput input);
        /// <summary>
        /// 获取内容详情页预览
        /// </summary>
        /// <param name="input">内容的输入模型</param>
        /// <returns>如果未找到返回空；搜索文件数据的字典如果没数据则为默认值</returns>
        Task<_ContentDto> _GetContentPreviewAsync(_ContentInput input);
        /// <summary>
        /// 获取第一条数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<_ContentDto> _FirstOrDefaultContent(_FirstContentInput input);

        /// <summary>
        /// 获取n个头条内容
        /// </summary>
        /// <param name="input"></param>
        /// <returns>topcount=0时获取所有数据</returns>
        Task<List<_ContentListDto>> _GetTopContentAsync(_TopContentInput input);


        /// <summary>
        /// 获取所有大事记
        /// </summary>
        /// <param name="input"></param>
        /// <returns>topcount=0时获取所有数据</returns>
        Task<List<_EventsContentListDto>> _GetAllEventsContentAsync(_EventsContentInput input);


        /// <summary>
        /// 更新点击
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> _UpdateHitAsync(_ContentIdInput input);

        /// <summary>
        /// 获取分页的内容信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<_ContentListDto>> _GetPagedContentAsync(_PagedContentInput input);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="input">上下页的模型</param>
        /// <returns></returns>
        Task<_PreAndNextDto> _GetPreAndNextContentAsync(_PreAndNextInput input);

        /// <summary>
        /// 获取多图
        /// </summary>
        /// <param name="keys"></param>
        /// <param name="Id"></param>
        /// <param name="maxCount">数量</param>
        /// <returns></returns>
        Task<Dictionary<string, List<FileObjectDto>>> _GetPicOrFileDics(string keys, Guid Id, int maxCount);
        #endregion


        #region 扩展接口
        /// <summary>
        /// 根据Guid 获取 AuxiliaryId
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<long> _GetLongIdAsync(Guid id);

        #endregion
    }
}
